#include <iostream>

using namespace std;

void solve() {
	int n, k;
	cin >> n >> k;
	int x1 = (n + 9) / 10;
	int x2 = x1 + x1 * 2;
	int x3 = x2 + x1 * 3;
	if (k > x3) {
		cout << "Da Tie" << endl;
	} else if (k > x2 && k <= x3) {
		cout << "Bronze Medal" << endl;
	} else if (k > x1 && k <= x2) {
		cout << "Silver Medal" << endl;
	} else {
		cout << "Gold Medal" << endl;
	}
}

int main() {
	solve();
	return 0;
}
